﻿using NET6.WebAPI.Attributes;
using System.ComponentModel.DataAnnotations;

namespace NET6.WebAPI.Reqs.User
{
    /// <summary>
    /// 用户查询请求模型
    /// </summary>
    public class Sys_UserQueryReq
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
    }

    /// <summary>
    /// 用户添加请求模型
    /// </summary>
    public class Sys_UserAddReq
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [StringLength(12, MinimumLength = 6)]
        public string Password { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [PhoneNumber]
        public string PhoneNumber { get; set; }
    }

    /// <summary>
    /// 用户修改请求模型
    /// </summary>
    public class Sys_UserUpdateReq : Sys_UserAddReq
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int ID { get; set; }
    }
}
